//
//  WCFindResult.h
//  WabbitCode
//
//  Created by William Towe on 3/10/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import "WCTreeNode.h"


typedef enum _WCFRType {
	WCFRTypeFile,
	WCFRTypeMatch,
	WCFRTypeMessage
	
} WCFRType;

@class WCTextFile;

@interface WCFindResult : WCTreeNode {
	WCFRType _resultType;
	WCTextFile *_textFile;
	NSRange _resultRange;
	NSString *_resultMessage;
	NSAttributedString *_resultAttributedString; // only used for matches, so we can bold the match
}
@property (readonly) WCFRType resultType;
@property (readonly) WCTextFile *textFile;
@property (readonly) NSRange resultRange;
@property (readonly) NSUInteger badgeCount;
@property (readwrite, copy) NSString *resultMessage;
@property (readwrite, retain) NSAttributedString *resultAttributedString;

+ (id)findResultWithType:(WCFRType)type textFile:(WCTextFile *)textFile range:(NSRange)range message:(NSString *)message;
@end
